<?php
/**
 * Introduction: 购物车  shopping_cart
 * @author: 王龙
 * @date: 2016/4/13 13:10
 * @email: wanglong@cdlinglu.com
 */

namespace Common\Model;

use Think\Model;

class CartModel extends Model
{

    protected $connection;//数据库连接
    //定义模型字段
    protected $fileds = [
        'id',
        'uid',
        'goods_id',
        'goods_num',
        'created',
        'goods_attr_val_ids',
        'invitation',
    ];
    protected $tableName = 'shopping_cart';//定义表

    public function _initialize()
    {//初始化

        $this->connection = C('Databaese');

    }
}
